package org.jmetrix.bus.impl;

/**
 * @author Konstantin Kuzmin
 * @version $Revision$
 * @since 01.10.11
 */
public class NamedBus extends BusImpl {
    private final String name;

    public String getName() {
        return name;
    }

    NamedBus(final String name) {
        this.name = name;
    }

    @Override
    public void shutdown() {
        super.shutdown();
        NamedBusFactory.removeBus(getName());
    }

    @Override
    public String toString() {
        return "NamedBus{" +
                "name='" + name + '\'' +
                '}';
    }
}
